package com.hundsun.documentripper.config;

import com.baomidou.mybatisplus.core.config.GlobalConfig;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * Note：
 *
 * @author ：mengjw
 * @description：MybatisPlus配置类
 * @date ：Created in 2021/1/27
 */

@Configuration
public class MybatisPlusConfig {

    /**
     * 自动填充功能
     */
    @Bean
    public GlobalConfig globalConfig() {
        GlobalConfig globalConfig = new GlobalConfig();
        globalConfig.setMetaObjectHandler(new MetaHandler());
        return globalConfig;
    }

    @Bean
    public MySqlInjector myLogicSqlInjector() {
        return new MySqlInjector();
    }

}